addHook("PlayerThink", function(player)
	if player.mo.skin == "jasonfox" and player.mo.valid
		-- The boost button. I/O shenanigans.
		if not player.boostbutton then
			local file = io.openlocal("client/boostcmd.txt", "r")
			if file then
				local text = file:read("*a")
				if text == ""
					player.boostbutton = BT_CUSTOM1
				else
					player.boostbutton = tonumber(text)
				end
				file:close()
			else
				player.boostbutton = BT_CUSTOM1
			end
		end
	end
end)

-- snek
local strToButton = {
    CUSTOM1 = BT_CUSTOM1,
    CUSTOM2 = BT_CUSTOM2,
    CUSTOM3 = BT_CUSTOM3,
	FIRE = BT_ATTACK,
	FIRENORMAL = BT_FIRENORMAL,
	TOSSFLAG = BT_TOSSFLAG
}

-- The command.
COM_AddCommand("boostcmd", function(player, arg1)
    io.openlocal("client/boostcmd.txt", "a"):close()
    local file = io.openlocal("client/boostcmd.txt", "w")
    if strToButton[arg1] then
        player.boostbutton = strToButton[arg1]
        file:write(strToButton[arg1])
		print("Button set successfuly.")
    else
        print("Not a valid button.")
    end
    file:close()
end)